Repository navigation
ci: add GitHub Actions workflow with a macOS end-to-end test - #11
Merged
Merged
Conversation
- Lint, test and build on Node 18, 22 and 24. - On macOS, pack the CLI, install the tarball globally (as users do) and check with `stat -f %Sf` that `hide` sets the hidden flag on every Desktop item but not on dotfiles, that `unhide` clears it, and that a missing Desktop folder exits non-zero. This would have caught both the missing shebang and the silent failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Mgqw4V1jB7R9rpS2KrNkg
Previously the CLI printed "hidden! 🤫" before chflags even started,
discarded its stderr, and always exited 0. On a non-macOS machine, with an
empty Desktop, or when chflags failed, users were told it had worked.
- Move the filesystem work into src/desktop.ts: list the Desktop with
readdir (skipping dotfiles, as the shell's `*` glob did) and pass the
paths straight to `chflags` with execFile. No shell means no hand-rolled
quoting; the old `replaceAll(' ', '" "')` only handled spaces.
- Print the success message only after chflags succeeds. On failure, show
chflags' stderr (or the error, e.g. a missing Desktop folder) and exit
with status 1.
- Fail fast with a clear message when not running on macOS.
- Say so when there is nothing on the Desktop to change instead of
running `chflags hidden ~/Desktop/*` against an unmatched glob.
- Add `--version`, a program name and a description.
- Use parseAsync now that the actions are async.
- Add the first tests (13 cases): setHidden against a real temp directory
with awkward filenames, and the CLI with the filesystem layer mocked so
it runs on any OS. `pnpm test` previously failed with "No tests found".
- Lint the test files: drop the type-aware `parserOptions.project`, which
no enabled rule needs and which rejects files excluded from the build
tsconfig. Drop `jest` from tsconfig `types`; tests import from
@jest/globals and are not part of the build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Mgqw4V1jB7R9rpS2KrNkg
…nto claude/add-ci
ayuthmang
marked this pull request as ready for review
October 10, 2026 08:06
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The project has no CI. Nothing would have caught the published 1.0.3 being unrunnable after
npm install -g, or the CLI reporting success whenchflagsfailed.Fix
Adds
.github/workflows/ci.yml:npm pack, installs the tarball globally (as users do) and runshide-files --version.$(…)filename and a.DS_Store.stat -f %Sfthathidesets thehiddenflag on every item except dotfiles, and thatunhideclears it.contentspermission, and cancels superseded runs.Why CI was red before
The first runs on this PR failed at
pnpm/action-setupbecause the branch predated #7, which adds thepackageManagerfield. Mergingmainfixed that. Merging #8 supplies the tests and CLI behavior the workflow checks. Both merges were conflict-free, and nothing was rebased or force-pushed.Verification
pnpm install --frozen-lockfile,lint,test(13/13),build,npm packplus a global install,--version, and the hide and missing-Desktop paths against a stubchflags.🤖 Generated with Claude Code
https://claude.ai/code/session_013Mgqw4V1jB7R9rpS2KrNkg